package com.routz.eos.rpctool.exception;

/**
 * {"code":500,"message":"Internal Service Error","error":{"code":3050000,"name":"action_validate_exception","what":"Action validate exception","details":[{"message":"Unknown action exec in contract transcpy","file":"chain_plugin.cpp","line_number":1777,"method":"abi_json_to_bin"},{"message":"code: transcpy, action: exec, args: {\"quantity\":\"1.0000 WOT\",\"memo\":\"transcpy花费3rmb购买imagetext用户的版权\",\"from\":\"user1\",\"to\":\"zhuanji\",\"type\":\"imagetext\",\"hash\":\"e75e3de4020fa387e1581f3081c390dbaf1bbda917554b45958b269770b393c3\"}","file":"chain_plugin.cpp","line_number":1788,"method":"abi_json_to_bin"}]}}
 {
     "code": 500,
     "message": "Internal Service Error",
     "error": {
         "code": 3050000,
         "name": "action_validate_exception",
         "what": "Action validate exception",
         "details": [{
             "message": "Unknown action exec in contract transcpy",
             "file": "chain_plugin.cpp",
             "line_number": 1777,
             "method": "abi_json_to_bin"
         },
         {
             "message": "code: transcpy, action: exec, args: {\"quantity\":\"1.0000 WOT\",\"memo\":\"transcpy花费3rmb购买imagetext用户的版权\",\"from\":\"user1\",\"to\":\"zhuanji\",\"type\":\"imagetext\",\"hash\":\"e75e3de4020fa387e1581f3081c390dbaf1bbda917554b45958b269770b393c3\"}",
             "file": "chain_plugin.cpp",
             "line_number": 1788,
             "method": "abi_json_to_bin"
         }]
     }
 }
 */
/**
 {
     "code": 500,
     "message": "Internal Service Error",
     "error": {
         "code": 3015001,
         "name": "abi_not_found_exception",
         "what": "No ABI found",
         "details": []
     }
 }
 */
public class ErrorResponse {
    private String code;
    private String message;
    private Error error;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Error getError() {
        return error;
    }

    public void setError(Error error) {
        this.error = error;
    }

    public class Error {
        private String code;
        private String name;
        private String what;
        private String[] details;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getWhat() {
            return what;
        }

        public void setWhat(String what) {
            this.what = what;
        }

        public String[] getDetails() {
            return details;
        }

        public void setDetails(String[] details) {
            this.details = details;
        }
    }
}
